Skip to content

Conversation

o000SAI000o
Copy link
Contributor

1.Recursive Solution
-Uses a top-down approach without memoization.
-Highlights the decision process for including or excluding each item.
2.Tabulation (Bottom-Up DP) Solution
-Efficient dynamic programming approach using a 2D table.
-Includes a utility function to print the DP table.
-Demonstrates space-time tradeoff compared to recursion.

Both implementations follow consistent formatting, inline documentation, and are aligned with the repository's existing code structure.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.87%. Comparing base (31bf130) to head (3b8c5df).

Files with missing lines Patch % Lines
...algorithms/dynamicprogramming/ZeroOneKnapsack.java 70.00% 2 Missing and 1 partial ⚠️
...orithms/dynamicprogramming/ZeroOneKnapsackTab.java 92.30% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6420      +/-   ##
============================================
+ Coverage     74.86%   74.87%   +0.01%     
- Complexity     5482     5491       +9     
============================================
  Files           682      684       +2     
  Lines         19012    19035      +23     
  Branches       3670     3675       +5     
============================================
+ Hits          14233    14253      +20     
- Misses         4224     4227       +3     
  Partials        555      555              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor Author

@o000SAI000o o000SAI000o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modifying the code

@o000SAI000o o000SAI000o reopened this Jul 20, 2025
@o000SAI000o o000SAI000o deleted the SAI branch July 20, 2025 13:04
@o000SAI000o o000SAI000o restored the SAI branch July 20, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants